<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="http://localhost:10001/sms/style.css" rel="stylesheet" type="text/css" />
    <script src="http://localhost:10001/sms/admin.js"></script>
</head>
<body>
    <span class="title">学生信息</span>
    <table class="table" border="1" cellspacing="0">
        <tr>
            <td class="td-id">ID</td>
            <td class="td-name">姓名</td>
            <td class="td-grade">年级</td>
            <td class="td-class">班级</td>
            <td class="td-sex">性别</td>
            <td class="td-age">年龄</td>
        </tr>
        <tr th:each="student : ${students}">
            <td class="td-id" th:text="${student.id}">id</td>
            <td class="td-name" th:text="${student.name}">name</td>
            <td class="td-grade" th:text="${student.grade}">grade</td>
            <td class="td-class" th:text="${student.clazz}">class</td>
            <td class="td-sex" th:text="${student.sex}">sex</td>
            <td class="td-age" th:text="${student.age}">age</td>
        </tr>
    </table>
    <div class="operations">
        <div class="add">
            <span class="title">添加学生</span>
            <div class="add-content">
                <form action="/addstudent" method="get">
                    <span class="add-content-label">姓名: </span><input class="add-content-text" type="text" name="name"><br>
                    <span class="add-content-label">密码: </span><input class="add-content-text" type="password" name="password"><br>
                    <span class="add-content-label">班级: </span><input class="add-content-text" type="text" name="clazz"><br>
                    <span class="add-content-label">年级: </span><input class="add-content-text" type="text" name="grade"><br>
                    <span class="add-content-label">年龄: </span><input class="add-content-text" type="text" name="age"><br>
                    <span class="add-content-label">性别: </span><input class="add-content-text" type="text" name="sex"><br>
                    <input class="submit" type="submit" value="添加">
                </form>
            </div>
        </div>
        <div class="delete">
            <span class="title">删除学生</span>
            <div class="add-content">
                <form action="/removestudent" method="get">
                    <span class="add-content-label">姓名: </span><input class="add-content-text" type="text" name="name"><br>
                    <input class="submit" type="submit" value="删除">
                </form>
            </div>
        </div>
        <div class="update">
            <span class="title">修改学生</span>
            <div class="add-content">
                <form action="/updatestudent" method="get">
                    <span class="add-content-label">姓名: </span><input class="add-content-text" type="text" name="name"><br>
                    <span class="add-content-label">密码: </span><input class="add-content-text" type="password" name="password"><br>
                    <span class="add-content-label">班级: </span><input class="add-content-text" type="text" name="clazz"><br>
                    <span class="add-content-label">年级: </span><input class="add-content-text" type="text" name="grade"><br>
                    <span class="add-content-label">年龄: </span><input class="add-content-text" type="text" name="age"><br>
                    <input class="submit" type="submit" value="修改">
                </form>
            </div>
        </div>
        <buttom class="submit logout-button" onclick="javascript:logout()">登出</buttom>
    </div>
</body>
</html>